package day1104.demo02;

import java.util.function.BiPredicate;

/**
 * @program: qy158
 * @description:
 * @author: 闫克起2
 * @create: 2022-11-04 10:02
 **/
public class Test04 {
    public static void main(String[] args) {
        //比较两个字符串是否相同.--断言函数式接口.
//        BiPredicate<String, String> predicate = (t1, t2) -> t1.equals(t2);

        //对象方法引用:
        BiPredicate<String, String> predicate = String::equals;
        boolean test = predicate.test("hello", "hello");
        System.out.println(test);

    }
}
